package com.study.kafkademo01.controller;

import com.study.kafkademo01.service.KafkaConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class KafkaConsumerController {

    @Resource
    private KafkaConsumerService kafkaConsumerService;

    @GetMapping("/getMessage")
    public String getMessage(){
        kafkaConsumerService.getMessage();
        return "get success";
    }
}
